package com.xxg.renrensearch.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 操作日志Dao
 *
 * @author xuxiaogang
 * @date 2021-11-30
 */
@Mapper
@Component
public interface RenrenShopOperationLogDao {
    /**
     * 根据时间戳查询日志信息
     *
     * @param startTime 时间戳
     * @return 结果
     */
    @Select("select identify_code as identifyCode,relation_ids as relationIds,ip,'primary' from renren_shop_operation_log " +
            "where create_time > STR_TO_DATE(#{startTime},'%Y-%m-%d %H:%i:%s')")
    List<RenrenShopOperationLog> selectByTime(@Param("startTime") String startTime);
}